package com.dingreading.cloud.app.service;

import com.dingreading.cloud.app.entity.StoreBooks;
import com.dingreading.cloud.common.util.PageUtil;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.util.List;

/**
 * 服务层。
 *
 * @author Administrator
 * @since 2023-11-22
 */
public interface StoreBooksService extends IService<StoreBooks> {

    Page<StoreBooks> pageList(PageUtil pageUtil, Long storeId, String keyword, Integer status, Long journalId,
                              Long bookLabelId, Integer isbnStatus);


    List<StoreBooks> getByStoreIdAndBooksId(Long storeId, Long bookId);

    List<StoreBooks> getByStoreIdAndIsbnOrBookNum(Long storeId, String isbn);

    List<StoreBooks> getByStoreIdAndIsbnOrBookNumOrName(Long storeId, String isbn);

    StoreBooks getByStoreIdAndId(Long storeId, Long id);

    /**
     * 批量修改库存数加一
     */
    void updateStockNum(Long id, Integer num);

}
